package com.hmdp.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: hmdp
 * @ClassName RedissonConfig
 * @description:
 * @author: oldTea
 * @create: 2024-08-26 21:51
 * @Version 1.0
 **/
@Configuration
public class RedissonConfig {
    @Bean
    public RedissonClient redissonClient(){
        Config config = new Config();
        config.useSingleServer().setAddress("redis://106.14.6.119:6379").setPassword("clj0517");
        return Redisson.create(config);
    }

}